package com.ruibang.glass.quality.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ruibang.glass.quality.domain.resp.*;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Author: songJinKang
 * @CreateTime: 2023-09-18  10:04
 * @Description: TODO:调度报表实体
 * @Version: 1.0
 */
@Data
@JsonIgnoreProperties({"hot", "cold", "monthProduction", "quality", "production"})
@TableName("g_scheduling_report")
public class SchedulingReport extends BaseEntity implements Serializable {

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty("日期")
    @NotBlank(message = "日期不可为空")
    private String date;

    @ApiModelProperty("班次")
    @NotBlank(message = "班次不可为空")
    private String classes;

    @ApiModelProperty("调度")
    @NotBlank(message = "调度不可为空")
    private String dispatch;

    @ApiModelProperty("热端信息JSON")
    private String hot;

    @ApiModelProperty("冷端信息JSON")
    private String cold;

    @ApiModelProperty("月综合产量JSON")
    private String monthProduction;

    @ApiModelProperty("生产JSON")
    private String production;

    @ApiModelProperty("质量JSON")
    private String quality;

    @ApiModelProperty("热端信息")
//    @NotNull(message = "热端信息不可为空")
//    @Valid
    @TableField(exist = false)
    private SchedulingHotInfo hotInfo;

    @ApiModelProperty("冷端信息")
//    @NotNull(message = "冷端信息不可为空")
//    @Valid
    @TableField(exist = false)
    private SchedulingColdInfo coldInfo;

    @ApiModelProperty("月综合产量")
//    @NotNull(message = "月综合产量不可为空")
//    @Valid
    @TableField(exist = false)
    private SchedulingMonthProduction monthProductionInfo;

//    @Valid
    @TableField(exist = false)
//    @NotNull(message = "生产信息不可为空")
    @ApiModelProperty("生产信息")
    private ProductionDetail productionDetail;

//    @Valid
    @TableField(exist = false)
//    @NotNull(message = "质量信息不可为空")
    @ApiModelProperty("质量信息")
    private QualityDetail qualityDetail;

    @ApiModelProperty("质量情况")
    private String qualityInfo;

    @ApiModelProperty("生产异常")
    private String abnormalProduction;
}
